import Vue from 'vue'
import App from './App.vue'

import VueRouter from 'vue-router'


Vue.use(VueRouter)
// 一级路由
import zhuye from "./views/zhuye.vue"
import xinwen from "./views/xinwen.vue"
import tiyu from "./views/tiyu.vue"
//二级路由
import ti from "./views/child/tiyuzhuye.vue"
import guo from "./views/child/guoneitiyu.vue"
import wai from "./views/child/waiguotiyu.vue"
const routes = [
  {
    path: "/",
    redirect: "/zhuye"
  },
  {
    path: "/zhuye",
    component: zhuye
  },
  {
    path: "/xinwen",
    component: xinwen
  },
  {
    path: "/tiyu",
    component: tiyu,
    children: [
      {
        path: "ti",
        component: ti
      },
      {
        path: "guo",
        component: guo
      },
      {
        path: "wai",
        component: wai
      }
    ]
  }
]

const router = new VueRouter({
  routes,
})

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
